Skip to contentSkip to conversation

xfce4-session: Make libpam and systemd dependencies conditional

PATCH Superseded Kang Wenlin 3 participants 4 messages Apr 23

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfce4-session: Make libpam and systemd dependencies conditional

From: Wenlin Kang <[email protected]>

libpam and systemd require the settings below:
INIT_MANAGER = "systemd" DISTRO_FEATURES:append = " pam systemd usrmerge"

So remove hardcoded libpam and systemd dependencies from DEPENDS. Add conditional logic to include these dependencies only when the corresponding DISTRO_FEATURES are enabled.

---
 .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb +7 -1
index b95bfc170c..191c49b216 100644
@@ -10,7 +10,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 XFCE_COMPRESS_TYPE = "xz"
 XFCEBASEBUILDCLASS = "meson"
 
-DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3 libpam systemd"
+DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3"
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '-Dauthentication-scheme=none', d)}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '-Dsession-manager=none', d)}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 
 inherit xfce-app
 
Signature · 1 line
2.43.0
#1 lore raw

Hi Wenlin,

Quoted 21 lines · On 4/23/26 11:17, [email protected] via lists.openembedded.org wrote:

From: Wenlin Kang <[email protected]>

libpam and systemd require the settings below:
INIT_MANAGER = "systemd" DISTRO_FEATURES:append = " pam systemd usrmerge"

So remove hardcoded libpam and systemd dependencies from DEPENDS. Add conditional logic to include these dependencies only when the corresponding DISTRO_FEATURES are enabled.

---
  .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb         | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb +0 -0
index b95bfc170c..191c49b216 100644
@@ -10,7 +10,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
  XFCE_COMPRESS_TYPE = "xz"

meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ · line 19

Quoted 10 lines
meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb +7 -1
  XFCEBASEBUILDCLASS = "meson"
 
-DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3 libpam systemd"
+DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver virtual/libx11 xfconf libwnck3"
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '-Dauthentication-scheme=none', d)}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '-Dsession-manager=none', d)}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"

I think it would be better to use PACKAGECONFIG.

//Yi

Quoted 12 lines
meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb +0 -1
  inherit xfce-app
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#126567): https://lists.openembedded.org/g/openembedded-devel/message/126567
Mute This Topic: https://lists.openembedded.org/mt/118966722/7283133
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
Quoted 39 lines · Yi Zhao via lists.openembedded.org

Hi Wenlin,

Quoted 10 lines · On 4/23/26 11:17, [email protected] via lists.openembedded.org wrote:

From: Wenlin Kang <[email protected]>

libpam and systemd require the settings below:
INIT_MANAGER = "systemd" DISTRO_FEATURES:append = " pam systemd usrmerge"

So remove hardcoded libpam and systemd dependencies from DEPENDS. Add conditional logic to include these dependencies only when the corresponding DISTRO_FEATURES are enabled.

Review

Quoted 6 lines
---
  .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb         | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

xfce4-screensaver_4.20.2.bb b/meta-xfce/recipes-apps/xfce4-screensaver/ xfce4-screensaver_4.20.2.bb

Quoted 2 lines

index b95bfc170c..191c49b216 100644
--- a/meta-xfce/recipes-apps/xfce4-screensaver/

xfce4-screensaver_4.20.2.bb

Quoted 1 line

+++ b/meta-xfce/recipes-apps/xfce4-screensaver/

xfce4-screensaver_4.20.2.bb

Review LIC_FILES_CHKSUM =

Quoted 1 line
(quoted diff) +0 -0
@@ -10,7 +10,13 @@ LIC_FILES_CHKSUM =

"file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \

meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \

Quoted 4 lines
meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb +0 -1
  XFCE_COMPRESS_TYPE = "xz"
  XFCEBASEBUILDCLASS = "meson"
 
-DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver

virtual/libx11 xfconf libwnck3 libpam systemd"

Review LIC_FILES_CHKSUM = · line 13

Quoted 1 line
(quoted diff) +1 -0
+DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver

virtual/libx11 xfconf libwnck3"

Review LIC_FILES_CHKSUM = · line 15

Quoted 2 lines
(quoted diff) +2 -0
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '',

'-Dauthentication-scheme=none', d)}"

Quoted 9 lines

Review LIC_FILES_CHKSUM = · line 16

Quoted 1 line
(quoted diff) +1 -0
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam',

'', d)}"

Review LIC_FILES_CHKSUM = · line 18

Quoted 2 lines
(quoted diff) +2 -0
+
+EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',

'', '-Dsession-manager=none', d)}"

Review LIC_FILES_CHKSUM = · line 19

Quoted 1 line
(quoted diff) +1 -0
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',

'systemd', '', d)}"

how did you test it for runtime correctness

Quoted 27 lines

I think it would be better to use PACKAGECONFIG.

//Yi

meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \

Quoted 6 lines
meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb +0 -0
  inherit xfce-app
 
 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#126568):
https://lists.openembedded.org/g/openembedded-devel/message/126568
Mute This Topic: https://lists.openembedded.org/mt/118966722/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 64 lines · Khem Raj

**
*CAUTION: This email comes from a non Wind River email account!*
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Wed, Apr 22, 2026 at 8:40 PM Yi Zhao via lists.openembedded.org <https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2PxcnXcY$> <[email protected]> wrote:

    Hi Wenlin,

    On 4/23/26 11:17, [email protected] via
    lists.openembedded.org
    <https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2PxcnXcY$>

    wrote:
    > From: Wenlin Kang <[email protected]>
    >
    > libpam and systemd require the settings below:
    >    INIT_MANAGER = "systemd"
    >    DISTRO_FEATURES:append = " pam systemd usrmerge"
    >
    > So remove hardcoded libpam and systemd dependencies from DEPENDS.
    > Add conditional logic to include these dependencies only when
    > the corresponding DISTRO_FEATURES are enabled.
    >
    > Signed-off-by: Wenlin Kang <[email protected]>
    > ---
    >   .../xfce4-screensaver/xfce4-screensaver_4.20.2.bb
    <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
           | 8 +++++++-
    >   1 file changed, 7 insertions(+), 1 deletion(-)
    >
    > diff --git
    a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
    <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
    b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
    <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
    > index b95bfc170c..191c49b216 100644
    > ---
    a/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
    <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
    > +++
    b/meta-xfce/recipes-apps/xfce4-screensaver/xfce4-screensaver_4.20.2.bb
    <https://urldefense.com/v3/__http://xfce4-screensaver_4.20.2.bb__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2BG6dSnq$>
    > @@ -10,7 +10,13 @@ LIC_FILES_CHKSUM =
    "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
    >   XFCE_COMPRESS_TYPE = "xz"
    >   XFCEBASEBUILDCLASS = "meson"
    >
    > -DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver
    virtual/libx11 xfconf libwnck3 libpam systemd"
    > +DEPENDS = "dbus-glib garcon gtk+3 libxklavier libxscrnsaver
    virtual/libx11 xfconf libwnck3"
    > +
    > +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES',
    'pam', '', '-Dauthentication-scheme=none', d)}"
    > +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam',
    'libpam', '', d)}"
    > +
    > +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES',
    'systemd', '', '-Dsession-manager=none', d)}"
    > +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
    'systemd', '', d)}"
Quoted 1 line

how did you test it for runtime correctness

I simply tested it using the following steps

1. build:

   $ echo "IMAGE_INSTALL:append = \" xfce4-screensaver\"" >> conf/local.conf
   $ bitbake core-image-minimal-xfce

2. runtime:
   1) boot target:

      $ runqemu slirp

   2) Start xfce4-screensaver and set screen saver theme

   3) Run command to lock screen immediately:

       $ xfce4-screensaver-command --lock

      Then the system immediately enters screen lock status

   4. Move the mouse or press any key, then the system exits screen lock

Quoted 30 lines
    I think it would be better to use PACKAGECONFIG.




    //Yi

    >
    >   inherit xfce-app
    >
    >
    >
    >

    -=-=-=-=-=-=-=-=-=-=-=-
    Links: You receive all messages sent to this group.
    View/Reply Online (#126568):
    https://lists.openembedded.org/g/openembedded-devel/message/126568
    <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-devel/message/126568__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2OrYLgaH$>
    Mute This Topic:
    https://lists.openembedded.org/mt/118966722/1997914
    <https://urldefense.com/v3/__https://lists.openembedded.org/mt/118966722/1997914__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2PssR6LX$>
    Group Owner: [email protected]
    <mailto:openembedded-devel%[email protected]>
    Unsubscribe:
    https://lists.openembedded.org/g/openembedded-devel/unsub
    <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-devel/unsub__;!!AjveYdw8EvQ!drctXgVUzS6YGylZg5JzV8ihkVwXVg8wkeBf01WoY7p6njmQCK8qv-_eJLOd1eB5yRC9uosEaS0i2GhbzOFe$>
    [[email protected]]
    -=-=-=-=-=-=-=-=-=-=-=-